package io.github.talelin.latticy.dto;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Positive;

@Data
public class BannerDTO {
//    @NotEmpty 用在集合类上面
//    @NotBlank 用在String上面,校验字符串不能为空
//    @NotNull 用在基本类型上
//    @Positive 正整数

    @NotBlank
    @Length(min = 2,max = 20)
    private String name;

    @Length(min = 2,max = 30)
    private String title;

    @Length(min = 2,max = 256)
    private String img;

    @Length(min = 2,max = 256)
    private String description;

}
